﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="AdminProductDetails.aspx.cs" Inherits="FlowersStore.AdminProductDetails" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>        
        <h2 class="AdminPart">
            Описание товара</h2>
    </div>
    <div>
        Название товара<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
            ControlToValidate="tbName" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
        :<br />
        <asp:TextBox ID="tbName" runat="server" />
        <br />
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                Артикул<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbArticle"
                    Display="Dynamic" ErrorMessage="*" />
                <asp:CustomValidator ID="UniqueArticleValidator" runat="server" ErrorMessage="*"
                    ControlToValidate="tbArticle" Display="Dynamic" OnServerValidate="ValidateArticle" />
                :<br />
                <asp:TextBox ID="tbArticle" runat="server" OnTextChanged="ValidateText" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
        Описание:<br/>
        <asp:TextBox ID="tbDescription" runat="server" TextMode="MultiLine" Rows="4" />
        <br />
        Категории:<br />
        <asp:CheckBoxList ID="cblCategories" runat="server" DataSourceID="CategoriesSqlDataSource"
            DataTextField="Category_name" DataValueField="Category_id" />
        <br />
        Большое изображение:<br />
        <asp:Image runat="server" ID="imgBig" />
        <asp:Label ID="lblBigStatus" runat="server" />
        <br />
        <asp:Button ID="btnLoadBig" runat="server" Text="Загрузить" CausesValidation="false"
            OnClick="btnLoadBig_Click" />
        <asp:FileUpload ID="uploadBig" runat="server" />
        <br />
        <br />
        Маленькое изображение:<br />
        <asp:Image runat="server" ID="imgThumb" />
        <asp:Label ID="lblThumbStatus" runat="server" />
        <br />
        <asp:Button ID="btnUploadThumb" runat="server" Text="Загрузить" CausesValidation="false"
            OnClick="btnUploadThumb_Click" />
        <asp:FileUpload ID="uploadThumb" runat="server" />
        <br />
        <br />
        Цена<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbPrice"
            Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="tbPrice"
            Display="Dynamic" ErrorMessage="*" ValidationExpression="[0-9]+([,\.][0-9]{1,4})?"></asp:RegularExpressionValidator>
        :<br />
        <asp:TextBox ID="tbPrice" runat="server" />
        руб.
        <br />
        <asp:Button ID="btnOk" runat="server" CausesValidation="true" OnClick="btnOk_Click" />
        <asp:Button ID="btnCancel" runat="server" Text="Отмена" OnClick="btnCancel_Click"
            CausesValidation="false" />
    </div>
    <asp:SqlDataSource ID="CategoriesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:FlowerStoreConnectionString %>"
        SelectCommand="SELECT [Category_id],[Department_name]+' / '+ [Category_name] as [Category_name] FROM [Category] inner join Department on Category.Department_id=Department.Department_id">
    </asp:SqlDataSource>
</asp:Content>
